Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle padding in netcdf3 translation #367

Merged
merged 3 commits into from
Oct 2, 2023

Conversation

mpiannucci
Copy link
Contributor

#365

The padding was not being handled, so the translation crashed because it was not an actual variable. This PR skips the padding but makes sure to increment the offset for each padding chunk encountered.

@martindurant
Copy link
Member

Can we make a file with such padding for the sake of tests?

@mpiannucci
Copy link
Contributor Author

mpiannucci commented Oct 2, 2023

I''ll take a stab.

@mpiannucci
Copy link
Contributor Author

mpiannucci commented Oct 2, 2023

Added a simple test case to the existing unlimited test. Without the padding being handled as it is in this PR, the test will fail because the temperature offset will be incorrect.

If youd prefer it broken out into a separate fixture I can do that too, but wanted to keep it simple

@martindurant
Copy link
Member

This is perfect

@martindurant martindurant merged commit 834d3f2 into fsspec:main Oct 2, 2023
5 checks passed
@mpiannucci mpiannucci deleted the netcdf3-padding branch October 2, 2023 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants